#tabs {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: var(--hover-color);
    overflow-x: scroll;
    height: 30px;
}
#tabs::-webkit-scrollbar {
    display: none;
}

#buttons {
    display: flex;
    position: sticky;
    left: 0;
    z-index: 3;
    background: var(--hover-color);
    margin-right: 4px;
}
#buttons > div {
    cursor: pointer;
    width: 24px;
    height: 24px;
    margin: 3px 0 0 3px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    background-color: var(--bg);
    position: relative;
}
#buttons > div:hover {
    background-color: var(--hover-color);
    box-shadow: var(--shadow);
}
#buttons > div > .icon {
    width: 24px;
}

.tab {
    display: flex;
    height: 30px;
    align-items: center;
    background-color: var(--hover-color);
    flex: 1;
    max-width: 200px;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}
.tab_focus {
    background-color: var(--bg) !important;
}
.tab_focus::before {
    position: absolute;
    left: -8px;
    bottom: 0;
    z-index: 2;
    width: 8px;
    height: 8px;
    content: "";
    background: radial-gradient(circle farthest-corner at 0% 0%, #0000 70%, var(--bg) 70%);
}
.tab_focus::after {
    position: absolute;
    right: -8px;
    bottom: 0;
    z-index: 2;
    width: 8px;
    height: 8px;
    content: "";
    background: radial-gradient(circle farthest-corner at 100% 0%, #0000 70%, var(--bg) 70%);
}

.tab > img {
    height: 20px;
    margin-left: 5px;
}
.loading {
    animation: loading 0.8s linear 0s infinite;
}
@keyframes loading {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.tab > span {
    cursor: default;
    padding-left: 4px;
    overflow: hidden;
    white-space: nowrap;
    flex-grow: 1;
}
.tab > button {
    min-width: 20px;
    height: 20px;
    background: none;
    border: none;
    border-radius: 4px;
    transition: var(--transition);
    margin: 5px;
    padding: 0;
    position: relative;
}

.tab > button > .icon {
    width: 20px;
}

.tab > button:hover {
    background-color: var(--hover-color);
    box-shadow: var(--shadow);
}
